home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / dspsv.z / dspsv
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. DDDDSSSSPPPPSSSSVVVV((((3333FFFF))))                                                            DDDDSSSSPPPPSSSSVVVV((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      DSPSV - compute the solution to a real system of linear equations  A * X
  10.      = B,
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE DSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
  14.  
  15.          CHARACTER     UPLO
  16.  
  17.          INTEGER       INFO, LDB, N, NRHS
  18.  
  19.          INTEGER       IPIV( * )
  20.  
  21.          DOUBLE        PRECISION AP( * ), B( LDB, * )
  22.  
  23. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  24.      DSPSV computes the solution to a real system of linear equations
  25.         A * X = B, where A is an N-by-N symmetric matrix stored in packed
  26.      format and X and B are N-by-NRHS matrices.
  27.  
  28.      The diagonal pivoting method is used to factor A as
  29.         A = U * D * U**T,  if UPLO = 'U', or
  30.         A = L * D * L**T,  if UPLO = 'L',
  31.      where U (or L) is a product of permutation and unit upper (lower)
  32.      triangular matrices, D is symmetric and block diagonal with 1-by-1 and
  33.      2-by-2 diagonal blocks.  The factored form of A is then used to solve the
  34.      system of equations A * X = B.
  35.  
  36.  
  37. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  38.      UPLO    (input) CHARACTER*1
  39.              = 'U':  Upper triangle of A is stored;
  40.              = 'L':  Lower triangle of A is stored.
  41.  
  42.      N       (input) INTEGER
  43.              The number of linear equations, i.e., the order of the matrix A.
  44.              N >= 0.
  45.  
  46.      NRHS    (input) INTEGER
  47.              The number of right hand sides, i.e., the number of columns of
  48.              the matrix B.  NRHS >= 0.
  49.  
  50.      AP      (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
  51.              On entry, the upper or lower triangle of the symmetric matrix A,
  52.              packed columnwise in a linear array.  The j-th column of A is
  53.              stored in the array AP as follows:  if UPLO = 'U', AP(i + (j-
  54.              1)*j/2) = A(i,j) for 1<=i<=j; if UPLO = 'L', AP(i + (j-1)*(2n-
  55.              j)/2) = A(i,j) for j<=i<=n.  See below for further details.
  56.  
  57.              On exit, the block diagonal matrix D and the multipliers used to
  58.              obtain the factor U or L from the factorization A = U*D*U**T or A
  59.              = L*D*L**T as computed by DSPTRF, stored as a packed triangular
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DDDDSSSSPPPPSSSSVVVV((((3333FFFF))))                                                            DDDDSSSSPPPPSSSSVVVV((((3333FFFF))))
  71.  
  72.  
  73.  
  74.              matrix in the same storage format as A.
  75.  
  76.      IPIV    (output) INTEGER array, dimension (N)
  77.              Details of the interchanges and the block structure of D, as
  78.              determined by DSPTRF.  If IPIV(k) > 0, then rows and columns k
  79.              and IPIV(k) were interchanged, and D(k,k) is a 1-by-1 diagonal
  80.              block.  If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
  81.              columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) is
  82.              a 2-by-2 diagonal block.  If UPLO = 'L' and IPIV(k) = IPIV(k+1) <
  83.              0, then rows and columns k+1 and -IPIV(k) were interchanged and
  84.              D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
  85.  
  86.      B       (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
  87.              On entry, the N-by-NRHS right hand side matrix B.  On exit, if
  88.              INFO = 0, the N-by-NRHS solution matrix X.
  89.  
  90.      LDB     (input) INTEGER
  91.              The leading dimension of the array B.  LDB >= max(1,N).
  92.  
  93.      INFO    (output) INTEGER
  94.              = 0:  successful exit
  95.              < 0:  if INFO = -i, the i-th argument had an illegal value
  96.              > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization has
  97.              been completed, but the block diagonal matrix D is exactly
  98.              singular, so the solution could not be computed.
  99.  
  100. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  101.      The packed storage scheme is illustrated by the following example when N
  102.      = 4, UPLO = 'U':
  103.  
  104.      Two-dimensional storage of the symmetric matrix A:
  105.  
  106.         a11 a12 a13 a14
  107.             a22 a23 a24
  108.                 a33 a34     (aij = aji)
  109.                     a44
  110.  
  111.      Packed storage of the upper triangle of A:
  112.  
  113.      AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.